// (c) 2007 Messaging Logic. All Rights Reserved.
package org.xi8ix.jms;

import javax.jms.Destination;
import javax.jms.JMSException;
import javax.jms.Message;
import javax.jms.MessageProducer;
import java.util.logging.Level;
import java.util.logging.Logger;

/**
 * @author Iain Shigeoka
 */
public class JMSMessageProducer implements MessageProducer {
    private static final Logger LOG = Logger.getLogger(JMSMessageProducer.class.getName());
    private JMSDestination destination;

    public JMSMessageProducer(JMSDestination destination) {
        this.destination = destination;
    }

    public void setDisableMessageID(boolean b) throws JMSException {
    }

    public boolean getDisableMessageID() throws JMSException {
        return false;
    }

    public void setDisableMessageTimestamp(boolean b) throws JMSException {
    }

    public boolean getDisableMessageTimestamp() throws JMSException {
        return false;
    }

    public void setDeliveryMode(int i) throws JMSException {
    }

    public int getDeliveryMode() throws JMSException {
        return 0;
    }

    public void setPriority(int i) throws JMSException {
    }

    public int getPriority() throws JMSException {
        return 0;
    }

    public void setTimeToLive(long l) throws JMSException {
    }

    public long getTimeToLive() throws JMSException {
        return 0;
    }

    public Destination getDestination() throws JMSException {
        return destination;
    }

    public void close() throws JMSException {
    }

    public void send(Message message) throws JMSException {
        LOG.log(Level.FINEST,"Sending message {0}",message);
        destination.send(message);
        LOG.log(Level.FINEST,"Sent message {0}",destination);
    }

    public void send(Message message, int i, int i1, long l) throws JMSException {
        LOG.log(Level.FINEST,"Sending message {0}",message);
        destination.send(message);
        LOG.log(Level.FINEST,"Sent message {0}",destination);
    }

    public void send(Destination destination, Message message) throws JMSException {
        throw new UnsupportedOperationException();
    }

    public void send(Destination destination, Message message, int i, int i1, long l) throws JMSException {
        throw new UnsupportedOperationException();
    }
}
